Modern vehicles include many components, such as an engine and transmission, as well as electronic circuits such as sensors and processing modules, LiDAR modules, electronic control modules, etc. Many of these components are housed within a vehicle compartment. The vehicle compartment typically has a movable cover, such as a hood or a door, which can be opened when an actuator (e.g., a physical button, a software button, etc.) is activated to provide access to the components housed within the vehicle compartment. Under normal operation (e.g., when the vehicle is moving), the vehicle compartment is locked such that the movable cover remains closed even when the actuator is activated. When the vehicle is stationary, a user (e.g., a driver, a passenger, a technician, or any person who has access to the cabin) can unlock the vehicle compartment from within the cabin to access the interior of the vehicle compartment.
Typically, a person who can gain entry into the cabin has full, unlimited access to the vehicle compartment. Such arrangements, however, can create security risks. For example, an intruder may break into the passenger cabin and gain access to the vehicle compartment. Also, in the context of ridesharing and autonomous driving, a passenger of an autonomous vehicle can gain access to the vehicle compartment in the absence of the owner of the vehicle being present. In both cases, the components housed within the vehicle compartment can be subject to unauthorized access, which can compromise the security of the vehicle. On the other hand, restricting access to the vehicle compartment can create inconvenience for maintenance work on the vehicle.